// -----------------------------
// Author: 		Dhaenens Gert	
// Creation: 	11/6/2014 8:35:28 PM				
// -----------------------------

#include "Oscillator.h"
#include "SoundFilter.h"

#include "SineOscillator.h"
#include "SquareOscillator.h"
#include "TriangleOscillator.h"
#include "SawtoothOscillator.h"

Oscillator* Oscillator::Create(SoundWaveType type)
{
	switch (type)
	{
		case SoundWaveType::Sine:
			return new SineOscillator();
		case SoundWaveType::Triangle:
			return new TriangleOscillator();
		case SoundWaveType::Square:
			return new SquareOscillator();
		case SoundWaveType::Sawtooth:
			return new SawtoothOscillator();
	}
	return nullptr;
}

Oscillator::Oscillator(SoundWaveType type)
	: m_Type(type)
{
}

Oscillator::~Oscillator()
{
}

SoundWaveType Oscillator::GetType() const
{
	return m_Type;
}